package mainFrame;

import context.*;

import javax.swing.JPanel;

import model2D.Model2D;

import object2D.Object2D;
import util.PixelPoint;

// ********************************************************************
// *** CLASS: DrawPanel
// ********************************************************************
public abstract class DrawPanel extends JPanel implements Context.Constants
{ //private static final boolean DEBUG=true; // Overriding Context.Constants.DEBUG
  static final String TAG="mainFrame.DrawPanel";
  static final long serialVersionUID=0; // AD'HOC

  protected Model2D objectModel;
  public Model2D getObjectModel() { return(objectModel); }

  protected double currentScale=1;
  public double getCurrentScale() { return(currentScale); }
  
  public Object2D getObject(PixelPoint p)
  { return(objectModel.getObject(p)); }
  
  public abstract Object2D.PointMark getPointMark(PixelPoint p);


  // ******************************************************************
  // *** METHOD: setSelected
  // ******************************************************************
  public abstract void setSelected(Object2D selected);

  // ******************************************************************
  // *** METHOD: requestResize
  // ******************************************************************
  public abstract void requestResize();

}
